<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<f:metadata>
	<f:event listener="#{pendingTransactionManageBean.onLoad}"
		type="preRenderView"></f:event>
</f:metadata>

<h:body>
	<ui:param name="root" value="#{request.contextPath}" />
	<ui:composition template="/Group2/masterPage.xhtml">
		<ui:define name="content">
			<!-- start content -->
			<div id="content">

				<!--  start page-heading -->
				<div id="page-heading"></div>
				<!-- end page-heading -->

				<table border="0" width="100%" cellpadding="0" cellspacing="0"
					id="content-table">
					<tr>
						<th rowspan="3" class="sized"><h:graphicImage
								library="group2" name="images/shared/side_shadowleft.jpg"
								width="20" height="300" alt="" /></th>
						<th class="topleft"></th>
						<td id="tbl-border-top">&nbsp;</td>
						<th class="topright"></th>
						<th rowspan="3" class="sized"><h:graphicImage
								library="group2" name="images/shared/side_shadowright.jpg"
								width="20" height="300" alt="" /></th>
					</tr>
					<tr>
						<td id="tbl-border-left"></td>
						<td>
							<!--  start content-table-inner ...................................................................... START -->
							<div id="content-table-inner">
								<!--  start table-content  -->
								<div id="table-content">


									<!--  start message-blue 
				<div id="message-blue">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="blue-left">Welcome back. <a href="">View my account.</a> </td>
					<td class="blue-right"><a class="close-blue"><img src="images/table/icon_close_blue.gif"   alt="" /></a></td>
				</tr>
				</table>
				</div>
				end message-blue -->
									<!--  start product-table ..................................................................................... -->
									<p:panel id="panel8" header="PENDING TRANSACTIONS LIST" />
									<h:dataTable
										rendered="#{pendingTransactionManageBean.listPendingTransactions ne null}"
										value="#{pendingTransactionManageBean.listPendingTransactions}"
										var="l" id="product-table" border="0" width="100%"
										cellpadding="0" cellspacing="0"
										headerClass="table-header-repeat line-left">
										<h:column>
											<!-- column header -->
											<f:facet name="header">
													Transaction ID
												</f:facet>
											<!-- row record -->
											<h:outputText value="#{l.transactionID}">
												<f:convertNumber />
											</h:outputText>
										</h:column>

										<h:column>
											<f:facet name="header">Deposit Account Number</f:facet>
											<h:outputText value="#{l.depositAccountNumber}">
												<f:convertNumber />
											</h:outputText>
										</h:column>

										<h:column>
											<f:facet name="header">Type</f:facet>
											<h:outputText value="#{l.transactionType}" />
										</h:column>

										<!--<h:column>
											<f:facet name="header">State</f:facet>
											<h:outputText value="#{l.transactionState}" />
										</h:column>  -->

										<h:column>
											<f:facet name="header">Funds</f:facet>
											<h:outputText value="#{l.funds}">
												<f:convertNumber pattern="#,###,##0.00" />
											</h:outputText>
										</h:column>

										<h:column>
											<f:facet name="header">Begin Time</f:facet>
											<h:outputText value="#{l.beginTime}">
												<f:convertDateTime pattern="dd/MM/yyyy hh:mm:ss" />
											</h:outputText>
										</h:column>

										<!-- <h:column>
											<f:facet name="header">End Time</f:facet>
											<h:outputText value="#{l.endTime}">
											</h:outputText>
										</h:column> -->

										<h:column>
											<f:facet name="header">Sender</f:facet>
											<h:outputText value="#{l.senderID}">
												<f:convertNumber />
											</h:outputText>
										</h:column>
										<h:column>
											<f:facet name="header">Receiver</f:facet>
											<h:outputText value="#{l.receiverID}">
												<f:convertNumber />
											</h:outputText>
										</h:column>

										<!-- <h:column>
											<f:facet name="header">Current Balance</f:facet>
											<h:outputText value="#{l.currentBalance}" />
										</h:column>
										<h:column>
											<f:facet name="header">After Balance</f:facet>
											<h:outputText value="#{l.afterBalance}" />
										</h:column> -->

										<h:column>
											<f:facet name="header" style="width:50px">Internet Transaction</f:facet>
											<h:outputText value="#{l.internetTransaction}" />
										</h:column>
										<h:column>
											<f:facet name="header">Creater</f:facet>
											<h:outputText value="#{l.createdBy}">
												<f:convertNumber />
											</h:outputText>
										</h:column>
										<h:column>
											<f:facet name="header">Approver</f:facet>
											<h:outputText value="#{l.approvedBy}">
												<f:convertNumber />
											</h:outputText>
										</h:column>
										<!-- <h:column>
											<f:facet name="header">Content</f:facet>
											<h:outputText value="#{l.content}" />
										</h:column> -->
										<h:column>
											<f:facet name="header">Options</f:facet>
											<h:form>
												<h:panelGrid columns="3">
													<h:commandButton styleClass="myButton"
														action="#{pendingTransactionManageBean.approveDepositTransaction(l.transactionID)}"
														value="Approve" />
													<h:commandButton styleClass="myButton"
														action="#{pendingTransactionManageBean.denyDepositTransaction(l.transactionID)}"
														value="Deny" />
													<h:commandButton styleClass="myButton"
														action="#{pendingTransactionManageBean.reviewDepositTransaction(l.transactionID)}"
														value="Review" />
												</h:panelGrid>
											</h:form>
										</h:column>
									</h:dataTable>
									<!--  end product-table................................... -->
								</div>
								<!--  end content-table  -->

								<!--  start actions-box ............................................... 
			<div id="actions-box">
				<a href="" class="action-slider"></a>
				<div id="actions-box-slider">
					<a href="" class="action-edit">Edit</a>
					<a href="" class="action-delete">Delete</a>
				</div>
				<div class="clear"></div>
			</div>
			end actions-box........... -->

								<!--  start paging..................................................... -->
								<!-- <table border="0" cellpadding="0" cellspacing="0"
									id="paging-table">
									<tr>
										<td><a href="" class="page-far-left"></a> <a href=""
											class="page-left"></a>
											<div id="page-info">
												Page <strong>1</strong> / 15
											</div> <a href="" class="page-right"></a> <a href=""
											class="page-far-right"></a></td>
										<td><select class="styledselect_pages">
												<option value="">Number of rows</option>
												<option value="">1</option>
												<option value="">2</option>
												<option value="">3</option>
										</select></td>
									</tr>
								</table> -->
								<!--  end paging................ -->

								<div class="clear"></div>

							</div> <!--  end content-table-inner ............................................END  -->
						</td>
						<td id="tbl-border-right"></td>
					</tr>
					<tr>
						<th class="sized bottomleft"></th>
						<td id="tbl-border-bottom">&nbsp;</td>
						<th class="sized bottomright"></th>
					</tr>
				</table>
				<div class="clear">&nbsp;</div>

			</div>
			<!--  end content -->
			<div class="clear">&nbsp;</div>
		</ui:define>
	</ui:composition>

</h:body>
</html>
